﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication1
{
    class Rectangle :Isharpe
    {
        public double dWidth;
        public double dHeight;
        //构造函数
        public Rectangle(double w, double h)
        {
            this.dHeight = h;
            this.dWidth  = w;
        }
        public double Width  //接口属性实现
        {   get
            {  return dWidth; }
            set
            {  dWidth = value;}
        }
        public double Height //接口属性实现
        {   get
            {  return dHeight;}
            set
            {  dHeight = value;}
        }
        public double GetArea() //接口方法实现,求矩形面积
        {   return this.dHeight * this.dWidth; }


    }
}
